package net.jarang.android.support.http;

public class HttpInvocatorException extends Exception {
	private ErrorCode errorCode;

	/**
	 * @author innerman
	 */
	public enum ErrorCode {
		SOCKET_TIMEOUT, CONNECTION_REFUSED, UNKNOWN
	}
	
	public HttpInvocatorException() {
		super();
	}
	
	public HttpInvocatorException(String message) {
		super(message);
	}
	
	public HttpInvocatorException(Throwable throwable) {
		super(throwable);
	}
	
	public HttpInvocatorException(String message, ErrorCode errorCode) {
		super(message);
		this.errorCode = errorCode;
	}

	public HttpInvocatorException(String message, Throwable throwable) {
		super(message, throwable);
	}
	
	public HttpInvocatorException(String message, Throwable throwable, ErrorCode errorCode) {
		super(message, throwable);
		this.errorCode = errorCode;
	}	

	public ErrorCode getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(ErrorCode errorCode) {
		this.errorCode = errorCode;
	}
}
